package com.ita.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import javax.servlet.http.HttpServletRequest;

public class RequestPayloadUtil {

	
	public static String getRequestBody(HttpServletRequest request) throws IOException{
		BufferedReader reader = new BufferedReader(new InputStreamReader(request.getInputStream()));
		 StringBuilder sb = new StringBuilder();
		 String line = null;
		 while((line = reader.readLine())!=null){
			 sb.append(line);
		 }
		 return sb.toString();
	}
}
